<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: xrefblk_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structxrefblk__t-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">xrefblk_t Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Structure to enumerate all xrefs. </p>
<p>This structure provides a way to access cross-references from a given address. For example:</p>
<div class="fragment"><div class="line"><a class="code" href="structxrefblk__t.html">xrefblk_t</a> xb;</div>
<div class="line"><span class="keywordflow">for</span> ( <span class="keywordtype">bool</span> ok=xb.<a class="code" href="structxrefblk__t.html#a3f5a64818451a5d2ac69ef941e02039d">first_from</a>(ea, <a class="code" href="group___x_r_e_f__.html#ga7842c679887f4701589ec71977461bc3">XREF_ALL</a>); ok; ok=xb.<a class="code" href="structxrefblk__t.html#af36d63b3cf0675e4c677802300611d2e">next_from</a>() )</div>
<div class="line">{</div>
<div class="line">   <span class="comment">// xb.to - contains the referenced address</span></div>
<div class="line">}</div>
</div><!-- fragment --><p> or: </p><div class="fragment"><div class="line"><a class="code" href="structxrefblk__t.html">xrefblk_t</a> xb;</div>
<div class="line"><span class="keywordflow">for</span> ( <span class="keywordtype">bool</span> ok=xb.<a class="code" href="structxrefblk__t.html#a2036ac0f693d1b0c63523b992dbb4e29">first_to</a>(ea, <a class="code" href="group___x_r_e_f__.html#ga7842c679887f4701589ec71977461bc3">XREF_ALL</a>); ok; ok=xb.<a class="code" href="structxrefblk__t.html#a1c2dcf4afcc5aa629402094d0d4de54a">next_to</a>() )</div>
<div class="line">{</div>
<div class="line">   <span class="comment">// xb.from - contains the referencing address</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>First, all code references will be returned, then all data references. If you need only code references, stop calling next() as soon as you get a dref.</p>
<p>If you need only data references, pass <a class="el" href="group___x_r_e_f__.html#ga0aebd80585c10650d16fd59ea35ba27d" title="return data references only ">XREF_DATA</a> flag to first(). You may not modify the contents of a <a class="el" href="structxrefblk__t.html" title="Structure to enumerate all xrefs. ">xrefblk_t</a> structure! It is read only. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a302b9b572de110399749d80379d38b00"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a302b9b572de110399749d80379d38b00"></a>
<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a302b9b572de110399749d80379d38b00">from</a></td></tr>
<tr class="memdesc:a302b9b572de110399749d80379d38b00"><td class="mdescLeft">&#160;</td><td class="mdescRight">the referencing address - filled by <a class="el" href="structxrefblk__t.html#a2036ac0f693d1b0c63523b992dbb4e29" title="Get xref to given address (store in from) ">first_to()</a>,<a class="el" href="structxrefblk__t.html#a1c2dcf4afcc5aa629402094d0d4de54a" title="Get next xref to address provided to first_to() ">next_to()</a> <br /></td></tr>
<tr class="separator:a302b9b572de110399749d80379d38b00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06337a92135467162f348e65fb1d0c98"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06337a92135467162f348e65fb1d0c98"></a>
<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a06337a92135467162f348e65fb1d0c98">to</a></td></tr>
<tr class="memdesc:a06337a92135467162f348e65fb1d0c98"><td class="mdescLeft">&#160;</td><td class="mdescRight">the referenced address - filled by <a class="el" href="structxrefblk__t.html#a3f5a64818451a5d2ac69ef941e02039d" title="Get first xref from the given address (store in to) ">first_from()</a>, <a class="el" href="structxrefblk__t.html#af36d63b3cf0675e4c677802300611d2e" title="Get next xref from address provided to first_from() ">next_from()</a> <br /></td></tr>
<tr class="separator:a06337a92135467162f348e65fb1d0c98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bebc678e2b1418b3744ddbf2a35bc31"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bebc678e2b1418b3744ddbf2a35bc31"></a>
<a class="el" href="pro_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a5bebc678e2b1418b3744ddbf2a35bc31">iscode</a></td></tr>
<tr class="memdesc:a5bebc678e2b1418b3744ddbf2a35bc31"><td class="mdescLeft">&#160;</td><td class="mdescRight">1-is code reference; 0-is data reference <br /></td></tr>
<tr class="separator:a5bebc678e2b1418b3744ddbf2a35bc31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ce94b5cd067ea6e4368d2f0883106e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ce94b5cd067ea6e4368d2f0883106e5"></a>
<a class="el" href="pro_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a7ce94b5cd067ea6e4368d2f0883106e5">type</a></td></tr>
<tr class="memdesc:a7ce94b5cd067ea6e4368d2f0883106e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">type of the last returned reference (<a class="el" href="group__xref__type.html#ga44e2b79869a9595bbe6265ff2026aa98" title="CODE xref types. ">cref_t</a> &amp; <a class="el" href="group__xref__type.html#ga78aab6d0d6bd9cb4904bbdbb5ac4fa71" title="DATA xref types. ">dref_t</a>) <br /></td></tr>
<tr class="separator:a7ce94b5cd067ea6e4368d2f0883106e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4d447ac9a7638a0dd7399aa4c3a58a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4d447ac9a7638a0dd7399aa4c3a58a8"></a>
<a class="el" href="pro_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#ab4d447ac9a7638a0dd7399aa4c3a58a8">user</a></td></tr>
<tr class="memdesc:ab4d447ac9a7638a0dd7399aa4c3a58a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">1-is user defined xref, 0-defined by ida <br /></td></tr>
<tr class="separator:ab4d447ac9a7638a0dd7399aa4c3a58a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Get first/next</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>The following functions first return code references, then data references.</p>
<p>If you need only code references, you need to check 'iscode' after each call. If you need only data references, use <a class="el" href="group___x_r_e_f__.html#ga0aebd80585c10650d16fd59ea35ba27d" title="return data references only ">XREF_DATA</a> bit. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td><a class="el" href="group___x_r_e_f__.html">Xref enumeration flags</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>ok </td></tr>
    <tr><td class="paramname">0</td><td>no more xrefs </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a3f5a64818451a5d2ac69ef941e02039d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f5a64818451a5d2ac69ef941e02039d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a3f5a64818451a5d2ac69ef941e02039d">first_from</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _from, int flags)</td></tr>
<tr class="memdesc:a3f5a64818451a5d2ac69ef941e02039d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get first xref from the given address (store in <a class="el" href="structxrefblk__t.html#a06337a92135467162f348e65fb1d0c98" title="the referenced address - filled by first_from(), next_from() ">to</a>) <br /></td></tr>
<tr class="separator:a3f5a64818451a5d2ac69ef941e02039d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af36d63b3cf0675e4c677802300611d2e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af36d63b3cf0675e4c677802300611d2e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#af36d63b3cf0675e4c677802300611d2e">next_from</a> (void)</td></tr>
<tr class="memdesc:af36d63b3cf0675e4c677802300611d2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get next xref from address provided to <a class="el" href="structxrefblk__t.html#a3f5a64818451a5d2ac69ef941e02039d" title="Get first xref from the given address (store in to) ">first_from()</a> <br /></td></tr>
<tr class="separator:af36d63b3cf0675e4c677802300611d2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2036ac0f693d1b0c63523b992dbb4e29"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2036ac0f693d1b0c63523b992dbb4e29"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a2036ac0f693d1b0c63523b992dbb4e29">first_to</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _to, int flags)</td></tr>
<tr class="memdesc:a2036ac0f693d1b0c63523b992dbb4e29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get xref to given address (store in <a class="el" href="structxrefblk__t.html#a302b9b572de110399749d80379d38b00" title="the referencing address - filled by first_to(),next_to() ">from</a>) <br /></td></tr>
<tr class="separator:a2036ac0f693d1b0c63523b992dbb4e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c2dcf4afcc5aa629402094d0d4de54a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c2dcf4afcc5aa629402094d0d4de54a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a1c2dcf4afcc5aa629402094d0d4de54a">next_to</a> (void)</td></tr>
<tr class="memdesc:a1c2dcf4afcc5aa629402094d0d4de54a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get next xref to address provided to <a class="el" href="structxrefblk__t.html#a2036ac0f693d1b0c63523b992dbb4e29" title="Get xref to given address (store in from) ">first_to()</a> <br /></td></tr>
<tr class="separator:a1c2dcf4afcc5aa629402094d0d4de54a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab53ce1c9cc889824cfa2e5f2d016fb93"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab53ce1c9cc889824cfa2e5f2d016fb93"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#ab53ce1c9cc889824cfa2e5f2d016fb93">next_from</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _from, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _to, int flags)</td></tr>
<tr class="memdesc:ab53ce1c9cc889824cfa2e5f2d016fb93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get xref from '_from' that comes after '_to'. <br /></td></tr>
<tr class="separator:ab53ce1c9cc889824cfa2e5f2d016fb93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f078092e307a8766c381682ace4410e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f078092e307a8766c381682ace4410e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structxrefblk__t.html#a1f078092e307a8766c381682ace4410e">next_to</a> (<a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _from, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> _to, int flags)</td></tr>
<tr class="memdesc:a1f078092e307a8766c381682ace4410e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get xref to '_to' that comes after '_from'. <br /></td></tr>
<tr class="separator:a1f078092e307a8766c381682ace4410e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="xref_8hpp.html">xref.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
